package com.etc.aop.springaop.annotation;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 班草
 * 
 * @author Administrator
 *
 */
@Component(value = "cg")
public class ClassGrass implements IGiveGift {

	@Value(value = "甄衰")
	private String name;

	// 要追求的那个ClassFlower
	@Resource(name = "cf")
	private ClassFlower cf;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public String toString() {
		return "ClassGrass [name=" + name + "]";
	}

	public ClassGrass(String name, ClassFlower cf) {
		super();
		this.name = name;
		this.cf = cf;
	}

	public ClassGrass() {
		// TODO Auto-generated constructor stub
	}

	@Override
	public void giveFlower() {
		// TODO Auto-generated method stub
		System.out.println(name + "给" + cf.getName() + "送999朵24K纯金的玫瑰花");
	}

	@Override
	public void giveLaTiao() {
		// TODO Auto-generated method stub
		System.out.println(name + "给" + cf.getName() + "送一箱卫龙的辣条");
	}

	@Override
	public void giveWatch() {
		// TODO Auto-generated method stub
		System.out.println(name + "给" + cf.getName() + "送一箱Iwatch");

	}

}
